package com.zhongpengcheng.blog.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * JWT配置项
 * note: 1.记录变更 by zhongpengcheng
 *
 * @author zhongpengcheng
 * @date 2021/08/26 12:44
 **/
@Getter
@Setter
@ConfigurationProperties(prefix = "jwt")
public class JWTProperties {
    /**
     * token在http请求中的key
     */
    private String header = "Authorization";
    /**
     * 访问凭证密钥
     */
    private String accessSecret = "what's up";
    /**
     * 访问凭证有效期（秒）
     */
    private Integer accessExpire = 60 * 30;
    /**
     * 刷新凭证密钥
     */
    private String refreshSecret = "gold watermelon";
    /**
     * 刷新凭证有效期（秒）
     */
    private Integer refreshExpire = 60 * 60 * 24 * 30;
    /**
     * 凭证加密算法
     */
    private String algorithm = "HS512";
    /**
     * refresh token在http请求中的key
     */
    private String reAuthHeader = "Re-Authorization";
    /**
     * 签发人
     */
    private String issuer = "DangerousMrQuin";
}
